package com.ikun.aimian.model.vo;

import com.ikun.aimian.model.entity.Job;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.Date;

@Data
public class JobVO implements Serializable {
    private Long id;
    private String companyName;
    private Integer positionCount;
    private Integer recruitNumber;
    private String positionInfo;
    private String companyIntro;
    private String jobRequirement;
    private String jobDescription;
    private String contact;
    private Date createTime;
    private Date updateTime;

    public static JobVO objToVo(Job job) {
        if (job == null) {
            return null;
        }
        JobVO vo = new JobVO();
        BeanUtils.copyProperties(job, vo);
        return vo;
    }

    public static Job voToObj(JobVO vo) {
        if (vo == null) {
            return null;
        }
        Job job = new Job();
        BeanUtils.copyProperties(vo, job);
        return job;
    }
}
